package com.lhc.front.api;


import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.lhc.service.service.BaseCacheService;
import com.lhc.service.util.FrontStatusConstants;
import com.lhc.service.util.Response;

@Controller
@RequestMapping("/lhc/front/redies")
public class rediesTest {
	private final Logger logger = Logger.getLogger(getClass());
	
	@Autowired
	private BaseCacheService baseCacheService;
	
	
	@ResponseBody
	@RequestMapping(method = { RequestMethod.GET,RequestMethod.POST }, value = { "/testSetRedies" })
	public String testSetRedies(){
		logger.info("测试开始");
		baseCacheService.set("name","刘海潮");
		logger.info("插入成功");
		String name = baseCacheService.get("name");
		System.out.println("name="+name);
		return Response.build().setStatus(FrontStatusConstants.Common.SUCCESS.status)
				.setMessage(FrontStatusConstants.Common.SUCCESS.message).toJSON();
	}
}

















